var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
        mode: 'application/json', //设置json模式
        lineNumbers: true, //是否显示左边换行术字
        lineWrapping: false, //是否折叠
        foldGutter: true,
        indentUnit: 4,
        gutters: ['CodeMirror-linenumbers', 'CodeMirror-foldgutter']
    });